﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    x:Class="C4F.VistaP2P.WPF.Media.MediaControl"
    Loaded="MediaControl_Loaded"
    >
	<UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Simple Styles.xaml"/>
                <ResourceDictionary Source="BlueResource.xaml"/>
            </ResourceDictionary.MergedDictionaries>

        
        <LinearGradientBrush x:Key="font" EndPoint="0.494,-0.136" StartPoint="0.506,1.136">
			<GradientStop Color="#FFADADAD" Offset="0"/>
			<GradientStop Color="#FFFFFFFF" Offset="1"/>
		</LinearGradientBrush>
	
		<!-- SimpleButtonFocusVisual is used to show keyboard focus around a SimpleButton control -->
		<Style x:Key="SimpleButtonFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Border>
							<Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	
		<!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
		<LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#EEE" Offset="0.0"/>
			<GradientStop Color="#CCC" Offset="1.0"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#CCC" Offset="0.0"/>
			<GradientStop Color="#444" Offset="1.0"/>
		</LinearGradientBrush>
	
		<LinearGradientBrush x:Key="blueGradient" EndPoint="0.468,-0.109" StartPoint="0.481,1.002">
			<GradientStop Color="#FF2F7BD1" Offset="0"/>
			<GradientStop Color="#FF0D3374" Offset="1"/>
		</LinearGradientBrush>	

		<!-- Disabled Brushes are used for the Disabled look of each control -->
		<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
        
            <!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
		
		<LinearGradientBrush x:Key="topBlueGradient" EndPoint="0.0,0" StartPoint="0.0,1.00">
			<GradientStop Color="#FF2F7BD1" Offset="0"/>
			<GradientStop Color="#FF0D3374" Offset="1"/>
		</LinearGradientBrush>
	
        	<!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
        	<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}" BasedOn="{x:Null}">
        		<Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/>
        		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
        		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
        		<Setter Property="Template">
        			<Setter.Value>
        				<ControlTemplate TargetType="{x:Type Button}">
					
        					<Grid x:Name="Grid">
						
        						<Rectangle Stroke="#FFFFFFFF" RadiusX="15" RadiusY="15" x:Name="rectangle" StrokeThickness="2" Fill="{DynamicResource blueGradient}"/>
						
        						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" OpacityMask="{x:Null}"/>
						
        						<!-- Content Presenter is where the text content etc is placed by the control -->
        					</Grid>
					
        					<!--Each state sets a brush on the Border in the template -->
        					<ControlTemplate.Triggers>
        						<Trigger Property="IsKeyboardFocused" Value="true"/>
        						<Trigger Property="IsMouseOver" Value="true">
        							<Setter Property="Fill" TargetName="rectangle">
        								<Setter.Value>
        									<LinearGradientBrush EndPoint="0.496,1.002" StartPoint="0.453,-0.109">
        										<GradientStop Color="#FF2F7BD1" Offset="0"/>
        										<GradientStop Color="#FF0D3374" Offset="1"/>
        									</LinearGradientBrush>
        								</Setter.Value>
        							</Setter>
        						</Trigger>
        						<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
        						<Trigger Property="IsPressed" Value="true">
        							<Setter Property="Background">
        								<Setter.Value>
        									<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
        										<GradientStop Color="#FFEEEEEE" Offset="0"/>
        										<GradientStop Color="#FF39CF6B" Offset="1"/>
        										<GradientStop Color="#FFE7E7E7" Offset="0.202"/>
        										<GradientStop Color="#FF39CF6B" Offset="0.205"/>
        									</LinearGradientBrush>
        								</Setter.Value>
        							</Setter>
        							<Setter Property="Fill" TargetName="rectangle">
        								<Setter.Value>
        									<LinearGradientBrush EndPoint="0.468,-0.109" StartPoint="0.481,1.002">
        										<GradientStop Color="#FF006900" Offset="0"/>
        										<GradientStop Color="#FF39CF6B" Offset="1"/>
        									</LinearGradientBrush>
        								</Setter.Value>
        							</Setter>
        						</Trigger>
        						<Trigger Property="IsEnabled" Value="true"/>
        						<Trigger Property="IsEnabled" Value="false">
        							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
        							<Setter Property="IsEnabled" TargetName="rectangle" Value="False"/>
        							<Setter Property="Fill" TargetName="rectangle">
        								<Setter.Value>
        									<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
        										<GradientStop Color="#FF9C9A9C" Offset="0"/>
        										<GradientStop Color="#FF393439" Offset="1"/>
        									</LinearGradientBrush>
        								</Setter.Value>
        							</Setter>
        						</Trigger>
        					</ControlTemplate.Triggers>
        				</ControlTemplate>
        			</Setter.Value>
        		</Setter>
        	</Style>
            
			<!--Each state sets a brush on the Border in the template -->
						
						
        </ResourceDictionary>
    </UserControl.Resources>
	<Grid>
		
		<Rectangle Stroke="{DynamicResource font}" RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="#FF000000"/>
		
		<Grid Height="Auto" Width="Auto">				
			<Grid.RowDefinitions>
				<RowDefinition Height="20"/>
				<RowDefinition Height="0"/>
				<RowDefinition Height="*"/>				
				<RowDefinition Height="18"/>		
				<RowDefinition Height="18"/>							
				<RowDefinition Height="18"/>				
				<RowDefinition Height="66"/>				
			</Grid.RowDefinitions>            
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="0.313*"/>
				<ColumnDefinition Width="0.687*"/>
				<ColumnDefinition Width="70"/>
			</Grid.ColumnDefinitions>
		
			<Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Grid.ColumnSpan="3" Stroke="#FF000000" Margin="0,0,29,0" x:Name="topLeftBlue" Fill="{DynamicResource topBlueGradient}">
				<Rectangle.Clip>
					<PathGeometry>
						<PathFigure IsClosed="True" StartPoint="1,16">
							<BezierSegment Point1="1,7.7157287525381" Point2="7.7157287525381,1" Point3="16,1" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="336,1"/>
							<BezierSegment Point1="344.284271247462,1" Point2="351,7.7157287525381" Point3="351,16" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="351,128"/>
							<BezierSegment Point1="351,136.284271247462" Point2="344.284271247462,143" Point3="336,143" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="16,143"/>
							<BezierSegment Point1="7.7157287525381,143" Point2="1,136.284271247462" Point3="1,128" IsSmoothJoin="True"/>
						</PathFigure>
					</PathGeometry>
				</Rectangle.Clip>
			</Rectangle>
		
			<Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Stroke="{x:Null}" x:Name="topRightBlue" ClipToBounds="False" StrokeEndLineCap="Flat" RenderTransformOrigin="0.5,0.5" Margin="124,0,0,0" Grid.ColumnSpan="2" Stretch="Fill" Fill="{DynamicResource topBlueGradient}" Grid.Column="1">
				<Rectangle.Clip>
					<PathGeometry>
						<PathFigure IsClosed="True" StartPoint="1,16">
							<BezierSegment Point1="1,7.7157287525381" Point2="7.7157287525381,1" Point3="16,1" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="336,1"/>
							<BezierSegment Point1="344.284271247462,1" Point2="351,7.7157287525381" Point3="351,16" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="351,128"/>
							<BezierSegment Point1="351,136.284271247462" Point2="344.284271247462,143" Point3="336,143" IsSmoothJoin="True"/>
							<LineSegment IsSmoothJoin="True" Point="16,143"/>
							<BezierSegment Point1="7.7157287525381,143" Point2="1,136.284271247462" Point3="1,128" IsSmoothJoin="True"/>
						</PathFigure>
					</PathGeometry>
				</Rectangle.Clip>
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="-1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
					
			<Button IsEnabled="False" Style="{DynamicResource ButtonStyle1}" x:Name="btnSendMedia" Content="Send" Foreground="{DynamicResource font}" Margin="0,0,10,10" Grid.Row="6" Width="55" FontSize="14" Grid.Column="2" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom" d:LayoutOverrides="VerticalAlignment, GridBox">
				<Button.Background>
					<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
						<GradientStop Color="#FFEEEEEE" Offset="0"/>
						<GradientStop Color="#FFCCCCCC" Offset="1"/>
						<GradientStop Color="#FFE7E7E7" Offset="0.202"/>
						<GradientStop Color="#FFE6E6E6" Offset="0.205"/>
					</LinearGradientBrush>
				</Button.Background>
			</Button>

            <!--<Button IsEnabled="False" Style="{DynamicResource ButtonStyle1}" x:Name="btnCancelMedia" Content="Cancel" Foreground="{DynamicResource font}" Margin="0,0,70,10" Grid.Row="6" Width="55" FontSize="14" Grid.Column="2" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom" d:LayoutOverrides="VerticalAlignment, GridBox">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFEEEEEE" Offset="0"/>
                        <GradientStop Color="#FFCCCCCC" Offset="1"/>
                        <GradientStop Color="#FFE7E7E7" Offset="0.202"/>
                        <GradientStop Color="#FFE6E6E6" Offset="0.205"/>
                    </LinearGradientBrush>
                </Button.Background>
            </Button>-->

            <Rectangle StrokeThickness="1" RadiusX="0" RadiusY="0" Stroke="{x:Null}" x:Name="topCenterBlue" Fill="{DynamicResource topBlueGradient}" HorizontalAlignment="Stretch" Width="Auto" Margin="4,0,40,0" Grid.ColumnSpan="2" Grid.Column="1"/>
		
			<Path VerticalAlignment="Bottom" Height="2" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="2" Grid.ColumnSpan="3" Data="M-0.5,30 L351.5,30" Margin="0,0,0,0"/>
		
			<TextBox IsEnabled="False" FontFamily="Calisto MT" FontWeight="Bold" Opacity="1" TextWrapping="Wrap" FontStyle="Normal" x:Name="tbStatusLog" BorderThickness="0,0,0,0" Padding="0,0,0,0" HorizontalContentAlignment="Stretch" VerticalScrollBarVisibility="Visible" Grid.IsSharedSizeScope="False" SpellCheck.IsEnabled="True" BorderBrush="{x:Null}" AcceptsReturn="True" FontSize="10" VerticalAlignment="Stretch" Margin="10,10,0,10" Background="#FFFFFFFF" Grid.Row="6" Height="Auto" Grid.ColumnSpan="2" d:LayoutOverrides="VerticalAlignment" RenderTransformOrigin="0.5,0.5" >
				<TextBox.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</TextBox.RenderTransform>
			</TextBox>
		
			<Label Focusable="False" Content="Media" Margin="10,-2.001,12.577,2.001" BorderBrush="{x:Null}" Height="Auto" Width="Auto" x:Name="lblTitle" Padding="0,0,0,0" Background="{x:Null}" Foreground="{DynamicResource font}" FontSize="15" VerticalContentAlignment="Top" d:LayoutOverrides="Width, Height" Grid.ColumnSpan="2"/>
			<MediaElement LoadedBehavior="Manual" Name="mPlayer" Grid.Row="1" Grid.ColumnSpan="3" Grid.RowSpan="2" Margin="10,10,10,8"/>
		
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="Auto" Height="Auto" FontSize="11" Name="lblLineOne" Grid.Row="3" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Bottom" Grid.RowSpan="1" Margin="10,0,0,0"/>
            
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="Auto" Height="Auto" FontSize="11" Name="lblLineTwo" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Grid.Row="4" Grid.RowSpan="1" VerticalAlignment="Bottom" Margin="10,0,0,0"/>
		
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="Auto" Height="Auto" FontSize="11" Name="lblLineThree" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Grid.Row="5" Grid.RowSpan="1" VerticalAlignment="Bottom" Margin="10,0,0,0"/>
		
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" Width="Auto" Height="Auto" FontSize="11" Name="lblLineOneValue" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Margin="0,0,0,0" d:LayoutOverrides="Width, Height" Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Column="1"/>
            
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" Width="Auto" Height="Auto" FontSize="11" Name="lblLineTwoValue" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Margin="0,0,0,0" d:LayoutOverrides="Width, Height" Grid.Row="4" VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="1"/>
		
			<Label Focusable="False" Content=""  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FFFFFFFF" Width="Auto" Height="Auto" FontSize="11" Name="lblLineThreeValue" Padding="0,0,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Margin="0,0,0,0" d:LayoutOverrides="Width, Height, GridBox" Grid.Row="5" VerticalAlignment="Bottom" HorizontalAlignment="Left" Grid.Column="1"/>
		
		</Grid>
		
		<Rectangle Stroke="{DynamicResource font}" RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="{x:Null}" Margin="0,-1,0,1"/>
            
	</Grid>
</UserControl>
